
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv=content-type content="text/html; charset=UTF-8">
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	<link rel="shortcut icon" href="favicon.ico" />
	<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/css/zuitu/index.css" type="text/css" media="screen" charset="utf-8" />
	<script src="/static/js/index.js" type="text/javascript"></script>
</head>
<body class="newbie">
<div id="doc">

<div id="hdw">
	<div id="hd">
		<div id="logo"><a href="<?php echo Yii::app()->request->baseUrl;?>" class="link"><img src="<?php echo Yii::app()->request->baseUrl;?>/css/zuitu/i/logo.gif" /></a><a href="<?php echo Yii::app()->request->baseUrl;?>/index.php/site/beijing" class="link"><img src="<?php echo Yii::app()->request->baseUrl;?>/css/zuitu/i/beijing.gif" /></a></div>


		<ul class="nav cf">
			<?php if(Yii::app()->getComponent('admin')->isGuest)//检查用户是否为管理员
			 { ?>
				<li><a href="<?php echo $this->createUrl('/'); ?>">首页</a></li>
				<li><a href="<?php echo $this->createUrl('site/last'); ?>">往期团购</a></li>
			<?php }

			 else { ?>
				<li><a href="<?php echo $this->createUrl('/team/index'); ?>">项目</a><span></span></li>
				<li><a href="<?php echo $this->createUrl('/category/index'); ?>">城市</a><span></span></li>
				<li><a href="<?php echo $this->createUrl('/user/index'); ?>">用户</a><span></span></li>
				<li><a href="<?php echo $this->createUrl('/partner/index'); ?>">商户</a><span></span></li>
				<li><a href="<?php echo $this->createUrl('/coupon/index'); ?>">优惠券</a><span></span></li>
				<li><a href="<?php echo $this->createUrl('/order/index'); ?>">订单</a><span></span></li>
			<?php }?>
		</ul>

		<div class="logins">

			<ul class="links">

				<li class="username">欢迎您 <?php echo Yii::app()->user->name.'！' ?></li>
			<?php if(Yii::app()->user->isGuest) { ?>
				<li class="login"><a href="<?php echo $this->createUrl('/user/login'); ?>">登录</a></li>
				<li class="signup"><a href="<?php echo $this->createUrl('/user/create'); ?>">注册</a></li>
			<?php }

			 else { ?>
				<li class="account"><a href="<?php echo $this->createUrl('/user/view?id='.Yii::app()->user->id); ?>" id="myaccount" class="account">我的易团网</a></li>
				<li class="logout"><a href="<?php echo $this->createUrl('/user/logout'); ?>">退出</a></li>
			<?php }?>
			</ul>
					<div class="line islogin"></div>
		</div>



		<?php
		/*$this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'主页', 'url'=>array('/')),
				array('label'=>'往期团购','url'=>array('/site/last')),
			),
			'htmlOptions'=>array('class'=>'nav cf'),
			'id'=>''
		));
		echo '<div class="logins">';
		$this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'登录', 'url'=>array('/user/login'), 'visible'=>Yii::app()->user->isGuest,'itemOptions'=>array('class'=>'login')),
				array('label'=>'注册', 'url'=>array('/user/create'),'visible'=>Yii::app()->user->isGuest,'itemOptions'=>array('class'=>'signup')),
				array('label'=>'商户', 'url'=>array('/biz/default/view?id='.Yii::app()->getModule('biz')->getComponent('partner')->id),'visible'=>!Yii::app()->getModule('biz')->getComponent('partner')->isGuest),
				array('label'=>'欢迎您，'.Yii::app()->user->name.'！','visible'=>!Yii::app()->user->isGuest,'itemOptions'=>array('class'=>'username')),
				array('label'=>'我的'.Yii::app()->name, 'url'=>array('/user/view?id='.Yii::app()->user->id),'visible'=>!Yii::app()->user->isGuest,'itemOptions'=>array('class'=>'account'),'linkOptions'=>array('class'=>'account','id'=>'myaccount')),
				array('label'=>'退出 ', 'url'=>array('/user/logout'), 'visible'=>!Yii::app()->user->isGuest,'itemOptions'=>array('class'=>'logout'))
			),
			'id'=>'account'
		));
		$isLogin = Yii::app()->user->name=='admin'?' islogin':'';
		echo '<div class="line'.$isLogin.'"></div></div>';
		$this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'我的订单'),
			),
			'id'=>'myaccount-menu'
		));*/
		?>
	</div>
</div>

<div id="bdw" class="bdw">
	<div id="bd" class="cf">
		<?php echo $content; ?>
	</div>
</div>

<div id="ftw">
	<div id="ft">
		<p class="contact">
			<?php if(Yii::app()->user->name=='admin') { ?>
			<a href="<?php echo $this->createUrl('partner/login'); ?>">网站管理</a>&nbsp;
			<?php }?>
			<a href="<?php echo $this->createUrl('biz/default/login'); ?>">商户登录</a>
		</p>
		<div class="copyright">
		<p>&copy;<span>2010</span>&nbsp;<?php echo CHtml::encode(Yii::app()->name); ?>版权所有&nbsp;<a href="/about/terms.php">使用<?php echo CHtml::encode(Yii::app()->name); ?>前必读</a>&nbsp;<a href="http://www.miibeian.gov.cn/" target="_blank">ICP</a>&nbsp;Powered by <a href="http://www.yiiframework.com/" target="_blank">YiiTuan</a> software.</p>
		</div>
	</div>
</div>

</div>
</body>
</html>